<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ taglib prefix="tags" tagdir="/WEB-INF/tags"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%>
<c:if test="${includeBody}">
<head>
    <title><fmt:message key="fileAsset" /></title>
</head>
<body>
</c:if>
    <div id="fileAssetSearchResultFragment">
        <h1><fmt:message key="fileAsset" /></h1>
        <script type="text/javascript">
            dojo.addOnLoad(function() {
                dojo.query(".fileAssetAjaxSearch").forEach(function(element) {
                    Spring.addDecoration(new Spring.AjaxEventDecoration({
                        elementId: element.id,
                        event: "onclick",
                        params: { decorator: "none" }
                    }));
                })

                dojo.query(".fileAssetAjaxDelete").forEach(function(element) {
                    Spring.addDecoration(new Spring.AjaxEventDecoration({
                        elementId: element.id,
                        event: "onclick",
                        popup: "true",
                        params: { decorator: "none" }
                    }));
                })
            });
        </script>
        <c:url var="searchUrl" value="/domain/fileAsset/searchAjax.action"/>
        <table class="listEntities">
            <thead>
                <tr>
					<th scope="col">&nbsp;</th>
                    <th scope="col">
                        <a id="sortLinkfileName" class="fileAssetAjaxSearch" href="${searchUrl}?${fileAssetSearchForm.fileNameQueryStringForSortableHeader}">
                            <fmt:message key="fileAsset_fileName"/>&nbsp;${fileAssetSearchForm.fileNameSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkfileSize" class="fileAssetAjaxSearch" href="${searchUrl}?${fileAssetSearchForm.fileSizeQueryStringForSortableHeader}">
                            <fmt:message key="fileAsset_fileSize"/>&nbsp;${fileAssetSearchForm.fileSizeSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkmimeType" class="fileAssetAjaxSearch" href="${searchUrl}?${fileAssetSearchForm.mimeTypeQueryStringForSortableHeader}">
                            <fmt:message key="fileAsset_mimeType"/>&nbsp;${fileAssetSearchForm.mimeTypeSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkpublishDate" class="fileAssetAjaxSearch" href="${searchUrl}?${fileAssetSearchForm.publishDateQueryStringForSortableHeader}">
                            <fmt:message key="fileAsset_publishDate"/>&nbsp;${fileAssetSearchForm.publishDateSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinklive" class="fileAssetAjaxSearch" href="${searchUrl}?${fileAssetSearchForm.liveQueryStringForSortableHeader}">
                            <fmt:message key="fileAsset_live"/>&nbsp;${fileAssetSearchForm.liveSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinklocked" class="fileAssetAjaxSearch" href="${searchUrl}?${fileAssetSearchForm.lockedQueryStringForSortableHeader}">
                            <fmt:message key="fileAsset_locked"/>&nbsp;${fileAssetSearchForm.lockedSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinktitle" class="fileAssetAjaxSearch" href="${searchUrl}?${fileAssetSearchForm.titleQueryStringForSortableHeader}">
                            <fmt:message key="fileAsset_title"/>&nbsp;${fileAssetSearchForm.titleSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkmodDate" class="fileAssetAjaxSearch" href="${searchUrl}?${fileAssetSearchForm.modDateQueryStringForSortableHeader}">
                            <fmt:message key="fileAsset_modDate"/>&nbsp;${fileAssetSearchForm.modDateSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkmodUser" class="fileAssetAjaxSearch" href="${searchUrl}?${fileAssetSearchForm.modUserQueryStringForSortableHeader}">
                            <fmt:message key="fileAsset_modUser"/>&nbsp;${fileAssetSearchForm.modUserSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">&nbsp;</th>
                </tr>
            </thead>
            <tbody>
            <c:forEach items="${fileAssets}" var="fileAsset" varStatus="status">
                <tr>
					<td>
						<img src="${adminHttpUrl}${fileAsset.path}" width="60" height="60" />
					</td>
                    <td>
                        <c:out value="${fileAsset.fileName}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.fileSize}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.mimeType}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.publishDate}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.live}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.locked}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.title}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.modDate}"/>
                    </td>
                    <td>
                        <c:out value="${fileAsset.modUser}"/>
                    </td>
                    <td>
                        <c:url var="showUrl" value="/domain/fileAsset/show.action">
                            <c:param name="fileAsset.inode" value="${fileAsset.inode}"/>
                        </c:url>
                        <c:url var="updateUrl" value="/domain/fileAsset/updateForm.action">
                            <c:param name="fileAsset.inode" value="${fileAsset.inode}"/>
                        </c:url>
                        <c:url var="confirmDeleteUrl" value="/domain/fileAsset/confirmDelete.action">
                            <c:param name="fileAsset.inode" value="${fileAsset.inode}"/>
                        </c:url>
                        <a class="actionShow" href="${showUrl}"><fmt:message key="label.link.show"/></a>
                        <a class="actionUpdate" href="${updateUrl}"><fmt:message key="label.link.update"/></a>
                        <a class="actionDelete fileAssetAjaxDelete" id="confirmDeleteUrl${status.index}" href="${confirmDeleteUrl}"><fmt:message key="label.link.delete"/></a>
                    </td>
                </tr>

            </c:forEach>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="18">
                        <p>
                            <tags:navigation pager="${pagerDisplay}" url="${searchUrl}" form="${fileAssetSearchForm}"/>
                        </p>
                    </td>
                </tr>
            </tfoot>
        </table>
    </div>
<c:if test="${includeBody}">
</body>
</c:if>